<?php $__env->startSection('content'); ?>


<?php if(count($errors)): ?>
<div class="alert alert-danger alert-block fade in">
    <button type="button" class="close close-sm" data-dismiss="alert"><i class="fa fa-times"></i></button>
    <h4><i class="icon-ok-sign"></i>验证错误!</h4>
    <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <p><?php echo e($error); ?></p>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<?php endif; ?>

<div class="row">
    <div class="col-lg-12">
        <section class="panel">
            <header class="panel-heading custom-tab dark-tab">
                <ul class="nav nav-tabs">
                    <li class="active">
                        <a href="#home2" data-toggle="tab">基本信息</a>
                    </li>
                    <li class="">
                        <a href="#about2" data-toggle="tab">优化</a>
                    </li>
                    <li class="">
                        <a href="#profile2" data-toggle="tab">其他信息</a>
                    </li>
                </ul>
            </header>

            <form class="form-horizontal adminex-form" method="post" action="">
            <?php echo e(csrf_field()); ?>

            <input type="hidden" name="info_id" value="<?php echo e(old('info_id') ? old('info_id'):$info->info_id); ?>">
            <div class="panel-body">
                    <div class="tab-content">
                        <div class="tab-pane active" id="home2">
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">所属栏目</label>
                                <div class="col-sm-10">
                                    <select class="form-control m-bot15" name="cate_id">
                                        <?php $__currentLoopData = $cate; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($key['cate_id']); ?>" 
                                                <?php if(old('cate_id') ? old('cate_id'):$info->cate_id==$key['cate_id']): ?>
                                                    selected
                                                <?php endif; ?>
                                            ><?php echo e($key['htmls']); ?><?php echo e($key['name']); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">标题</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="title" value="<?php echo e(old('title') ? old('title'):$info->title); ?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">栏目图</label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control" name="picture" value="<?php echo e(old('picture')?old('picture'):$info->picture); ?>">
                                       
                                </div>
                                <br>
                                <hr>
                                <label class="col-sm-2 col-sm-2 control-label"></label>
                                <div class="col-sm-10">
                                   <img  id="upload_img" src="https://adman.henghost.com/data/updata/20180308093319.gif" alt="">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">简短内容</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="zhaiyao" value="<?php echo e(old('zhaiyao')?old('zhaiyao'):$info->zhaiyao); ?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">内容</label>
                                <div class="col-sm-10">
                                <textarea  name="content" id="content"><?php echo e(old('content')?old('content'):$info->content); ?></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="about2">
                          
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">页面关键词</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="keywords" value="<?php echo e(old('keywords')?old('keywords'):$info->keywords); ?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">页面描述</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="description" value="<?php echo e(old('description')?old('description'):$info->description); ?>">
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="profile2">
                           
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">来源</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="from" value="<?php echo e(old('from')?old('from'):$info->from); ?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">发表时间</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="creattime" value="<?php echo e(old('creattime')?old('creattime'):$info->creattime); ?>"  onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">点击次数</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="hit" value="<?php echo e(old('hit')?old('hit'):$info->hit); ?>">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">作者</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="author" value="<?php echo e(old('author')?old('author'):$info->author); ?>">
                                </div>
                            </div>
                        </div>
                        <!-- <div class="tab-pane" id="contact2">Contact</div> -->
                    </div>
                    <div class="panel-body">
                        <div class="col-lg-offset-2 col-lg-10">
                            <button type="submit" class="btn btn-success">提交</button>
                            <button type="reset" class="btn btn-default">重置</button>
                        </div>
                    </div>
            </div>
                                <h2 onclick="javascript:$.myAlert({})">dsf</h2>
            </form>
        </section>
    </div>
</div>

<?php $__env->stopSection(); ?>


<?php $__env->startSection('js'); ?>



<script src="<?php echo e(asset('uploadify/jquery.uploadify.min.js')); ?>" type="text/javascript"></script>
    <script type="text/javascript">
           function aa(){
           }

           $.myAlert = function (args) {
                $('#file_upload').uploadify({
                'formData'     : {
                    '_token'     : '<?php echo e(csrf_token()); ?>'
                },
                'swf': '<?php echo e(asset("uploadify/uploadify.swf")); ?>',
                // 'swf': 'http://localhost/upload/upload',
                'uploader' : 'http://localhost/upload/upload',
                // 'uploader' : 'http://localhost/uploadify/uploadify.swf',
                'onUploadSuccess' : function(file, data, response) {
                           // console.log(data);
                           console.log(response);
                           $("input[name='picture']").val(response);
                           $("#upload_img").attr('src',response);
                }
                });
           };
</script>


<script type="text/javascript" charset="utf-8" src="<?php echo e(asset('utf8php')); ?>/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="<?php echo e(asset('utf8php')); ?>/ueditor.all.js"> </script>
<script type="text/javascript" charset="utf-8" src="<?php echo e(asset('utf8php')); ?>/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    var ue = UE.getEditor('content');
</script>



<?php $__env->stopSection(); ?>


<?php echo $__env->make('admin.layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>